<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ page import="java.util.*,
				 com.kylin.module.shop.orm.*,
                 com.kylin.common.util.*,
                 com.kylin.common.paginate.DisplayPage,
				 com.kylin.module.user.orm.*" %>
<%@ include file="/common/include/taglibs.jsp"%>
<%@ include file="/common/include/pageExpires.jsp"%>
<%@ include file="/common/include/dictNames.jsp"%>

<%@ page import="com.kylin.module.services.orm.Service"%>
<br>
<b>《系统属性表 列表》</b>
<hr>

以下是系统中各模块使用到的所有属性
<br>
<form action="/admin/service/manageService.do?CMD=search" method="post">

	<!-- 系统支持语言下拉菜单 对应字典名 Constants.SYSLANGUAGE --> 
	<mytag:national name="language" value="<%= sessionLocale.toString() %>" 
				dictName="<%=Constants.SYSLANGUAGE %>"/>
                
	<!-- 所有国家下拉菜单 对应字典名 Constants.ALLCOUNTRY -->  	
	<mytag:national name="country" value="<%= sessionLocale.toString() %>" 
	                                    dictName="<%=Constants.ALLCOUNTRY%>"/>
	                                    
	<!-- 服务类别下拉菜单 对应字典名 dict_services，参见 /common/include/dictNames.jsp -->                                    
	<mytag:select name="catService" dictName="<%=dict_services%>"/>	
				
	<input type="text" name="keyword">
	<input type="submit" name="submit" value="<bean:message key="base.submit" />">

</form>
<mytag:MyActionMsg />

<table class='pageTable' cellspacing='0' cellpadding='0'> 
     <tr>
        <td class='pageTitle'>ID号</td>
        <td class='pageTitle'>服务类别</td>
        <td class='pageTitle'>联系信息</td>
        <td class='pageTitle'>联系地址</td>
        <td class='pageTitle'>服务内容</td>
        <td class='pageTitle'>语言</td>
        <td class='pageTitle'>操作</td>
      </tr>

<%
		if (request.getAttribute(Constants.KEY_REQUEST_RESULT) != null) {
		DisplayPage dispage = (DisplayPage) request
		.getAttribute(Constants.KEY_REQUEST_RESULT);

		String deleteUrl = "/admin/service/manageService.do?CMD=delete&page="
		+ dispage.getPageNumber()
		+ "&searchId="
		+ dispage.getSearchId();
		String serviceDetailUrl = "/admin/service/manageService.do?CMD=detailService&Id=";
		for (int i = 0; i < dispage.getList().size(); i++) {
			Service s = (Service) dispage.getList().get(i);
%>
<tr class='row<%=(i % 2)%>'>
	<td class='pageTd'>
		<%=s.getId()%>
	</td>
	<td class='pageTd'>
		<!-- <a href="<%=serviceDetailUrl + s.getId()%>">  -->
		<%=s.getCatService().getName()%>

	</td>
	<td class='pageTd'>
		<%=s.getContact()%>
		<br>
		<%=s.getPhoneCountry()%>
		-
		<%=s.getPhoneArea()%>
		-
		<%=s.getPhone()%>
		<br>
		<%=s.getEmail()%>
	</td>
	<td class='pageTd'>
		<%=s.getAddress()%>
	</td>

	<td class='pageTd'>
		<%=s.getContent()%>
	</td>

	<td class='pageTd'>
		<a href="<%=deleteUrl + "&id=" + s.getId()%>">删除</a>
	</td>
</tr>
<%
		}
		out.println("</table>");
		out.print(JspHelper.getPageBar(dispage,request.getRequestURL()+"?CMD=search"));	
	} else {
		out.println("未找到记录");
	}
%>
